
package com.be.beadmin.quality.service;

import com.be.beadmin.common.entity.PageEntity;
import com.be.beadmin.quality.dto.input.ComplaintFileInfoDto;
import com.be.beadmin.quality.dto.input.CustomComplaintAllDto;
import com.be.beadmin.quality.dto.input.CustomComplaintDto;
import com.be.beadmin.quality.dto.output.CustomComplaintAllEx;
import com.be.beadmin.quality.dto.output.CustomComplaintEx;
import org.springframework.data.domain.Page;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.List;

/**
* @description 服务接口
* @author zjm
* @date 2023-05-15
**/
public interface CustomComplaintService {

    /**
    * 分页的查询接口
    * @param pageEntity
    * @return
    */
    Page<CustomComplaintEx> getCustomComplaintByPage(HttpServletRequest request,PageEntity pageEntity);

    /**
    * @param customComplaintDto
    */
    void addCustomComplaint(CustomComplaintDto customComplaintDto);

    /**
    * @param customComplaintDto
    */
    void updateCustomComplaint(CustomComplaintDto customComplaintDto);

    /**
    * @param id
    */
    void delCustomComplaint(String id);

    /**
    * 删除多个角色
    * @param ids
    */
    void delCustomComplaints (List<String> ids);

    /**
     * 根据id获取客户投诉单
     * @param id
     * @return
     */
    CustomComplaintAllEx getCustomComplaintById(String id);

//    /**
//     * 更新该条客户投诉信息
//     * @param complaintAllDto
//     * @return
//     */
//    int updateCustomComplaint(CustomComplaintAllDto complaintAllDto);

    /**
     * 更新该条客户投诉信息
     * @param complaintAllDto
     * @return
     */
    int updateCustomComplaintAll(CustomComplaintAllDto complaintAllDto);

    /**
     * 完成客户投诉
     * @param id
     */
    void finishCustomComplaint(String id);


    /**
     * 根据ID查看该条客户投诉信息new
     * @param id
     * @return
     */
    CustomComplaintEx getCustomComplaintByIdNew(String id);

    /**
     * 上传客户投诉信息
     * @param complaintId
     */
    void submitCustomComplaint(String complaintId);

    /**
     * 关闭客户投诉信息
     * @param complaintId
     * @param finishTime
     */
    void shutdownCustomComplaint(String complaintId,Date finishTime);

    /**
     * 处理客户投诉信息 -- 负责人
     * @param request
     * @param complaintId
     */
    void handleCustomComplaint(HttpServletRequest request, String complaintId,String reasonAnalysis,MultipartFile[] multipartFiles,String bucketName);
    /**
     * QM添加客户投诉信息
     * @param infoId
     * @param customerName
     * @param responsorId
     * @param bugCount
     * @param problemTextDes
     * @param problemType
     * @param multipartFile
     * @param tempSolution
     * @param makerId
     * @param makerTime
     */
    void addCustomComplaintByQm(HttpServletRequest request, String infoId, String customerName, String responsorId, int bugCount, String problemTextDes, String problemType,MultipartFile[] multipartFile, String tempSolution, String bucketName, String makerId, Date makerTime);

    /**
     * QM分析 -- 该条客户投诉信息
     * @param request
     * @param complaintId
     * @param baseReasonAnalysis
     * @param improvementText
     */
    void analyzeCustomComplaintByQm(HttpServletRequest request, String complaintId, String baseReasonAnalysis, String improvementText);


    /**
     * @param customComplaintId
     * @param bucketName
     * @param state
     * @return urls
     */
    List<String> getFilePreviewUrl(String customComplaintId,String bucketName,Integer state);

    //void delComplaintByInfoId();
}